SUMMARY = "UnixBench is the original BYTE UNIX benchmark suite"
HOMEPAGE = "https://github.com/kdlucas/byte-unixbench"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
#SRC_URI = "git://github.com/kdlucas/byte-unixbench.git"
#SRCREV = "e477bc034137f994f2bbaba52952ca6e1de53856"
#S = "${WORKDIR}/git"

SRC_URI = "https://github.com/kdlucas/byte-unixbench/archive/refs/heads/master.zip;downloadfilename=byte-unixbench-${PV}.zip"
SRC_URI[md5sum] = "4812d550c9650096a5a5abd49a6a6f2d"
SRC_URI[sha256sum] = "3a6de368334006860e1742d5604740da8ac72f8ca2595c68db3eaa8911f2413e"
S = "${WORKDIR}/byte-unixbench-master"
B = "${S}/UnixBench"

DEPENDS = "virtual/libgl virtual/libx11"
RDEPENDS:${PN} += "perl perl-modules"

EXTRA_OEMAKE = "CC='${CC}' UB_GCC_OPTIONS='${CFLAGS}' GRAPHIC_TESTS=defined"

do_install(){
	install -d ${D}/opt/unixbench
	cp -r ${B}/* ${D}/opt/unixbench
}

PACKAGES = "${PN} ${PN}-dbg"
FILES:${PN} = "/opt/unixbench/"

TARGET_CC_ARCH += "${LDFLAGS}"
